<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>类型维护成功管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#name").focus();
			$("#inputForm").validate({
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox") || element.is(":radio") || element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
		});
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li><a href="${ctx}/admin/sysType/">类型维护成功列表</a></li>
		<li class="active"><a href="${ctx}/admin/sysType/form?id=${tType.id}&parent.id=${tTypeparent.id}">类型维护成功<shiro:hasPermission name="shop:tType:edit">${not empty tType.id?'修改':'添加'}</shiro:hasPermission><shiro:lacksPermission name="shop:tType:edit">查看</shiro:lacksPermission></a></li>
	</ul><br/>
	<form:form id="inputForm" modelAttribute="tType" action="${ctx}/admin/sysType/save" method="post" class="form-horizontal">
		<form:hidden path="cCode"/>
		<sys:message content="${message}"/>		
		<div class="control-group">
			<label class="control-label">类型名称：</label>
			<div class="controls">
				<form:input path="cName" htmlEscape="false" maxlength="255" class="input-xlarge required"/>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">上级父级节点:</label>
			<div class="controls">
				<sys:treeselect id="cBelong"  name="cBelong" value="${tType.CBelong}" labelName="parent.name" labelValue="${tType.PName}"
					title="父级节点" url="/admin/sysType/treeData/" extId="${tType.id}" cssClass="required" allowClear="true" />
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">广告顺序：</label>
			<div class="controls">
				<form:input path="cEnable" htmlEscape="false" maxlength="2" class="input-xlarge required number"/>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">广告编号：</label>
			<div class="controls">
				<form:input path="cMod" htmlEscape="false" maxlength="5" class="input-xlarge required number"/>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">广告描述:：</label>
			<div class="controls">
				<form:input path="cDes" htmlEscape="false" maxlength="255" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">广告图片</label>
			<div class="controls">
				<form:hidden id="nameImage" path="cKeyword" htmlEscape="false" maxlength="255" class="input-xlarge"/>
				<sys:ckImage input="nameImage" type="images" uploadPath="/cms/site"/>
			</div>
		</div>
		<div class="form-actions">
			<input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>
			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
		</div>
	</form:form>
</body>
</html>